#ifndef __ERBSCurve_H__
#define __ERBSCurve_H__

#include "gmPCurve.h"
#include "gmSelector.h"
#include "erbseval.h"

namespace GMlib {


	class ERBSCurve : public PCurve<double> {
	public:
		ERBSCurve( PCurve *sampleThis, int n, int d ); // n sample punkter, d grads bezier.
		ERBSCurve( const DVector<Vector<double,3>> c ); // coeff
		//ERBSCurve( const DVector<Vector<double,3>> g ); // points + pointdata (derivatives)
		//ERBSCurve( const ERBSCurve<double>& copy );
		virtual ~ERBSCurve();

		std::string   getIdentity() const;
		bool          isClosed() const;
		DVector<Vector<double,3>> _c; // coefficients
		void showSelectors( bool grid, const Color& _selector_color, const Color& grid_color );
		PCurve *sampleThisCurve;

	protected:
		ERBSEvaluator	_erbsEval;
		double             _size;

		void							eval(double t, int d, bool l);
		double						getEndP();
		double						getStartP();
		//DVector< Selector<T,3>* >     _s;
		//bool _selectors;
		//void edit( int );

	}; // END class ERBSCurve


} // END namepace GMlib


#endif

